Inspection system, controller, inspection method, and inspection program

ABSTRACT

An inspection system for inspecting a workpiece includes: an omnidirectional camera; a movement device for causing the workpiece to circle around the omnidirectional camera in a state where a posture of the workpiece is maintained; an acquisition unit for outputting a capturing instruction to the omnidirectional camera at a plurality of timings while the movement device causes the workpiece to circle around the omnidirectional camera, and for acquiring, from the omnidirectional camera, a plurality of input images indicating the workpiece from different directions; and an inspector for inspecting the workpiece by using the plurality of input images.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based on Japanese Patent Application No. 2017-008255filed with the Japan Patent Office on Jan. 20, 2017, the entire contentsof which are incorporated herein by reference.

FIELD

The present disclosure relates to a technology for inspecting an objectto be inspected by using an omnidirectional camera.

BACKGROUND

In a factory automation (FA) field, a technology for inspecting anexternal appearance of an object to be inspected by using a camera hasbeen developed. Regarding this technology, JP 2000-180382 A (PatentDocument 1) discloses a visual inspection device that can inspect, at ahigh speed, a surface of an object to be inspected randomly placed on aconveyor. More specifically, the visual inspection device captures anobject to be inspected conveyed on a conveyor from different directionswith a plurality of cameras. The visual inspection device then inspectsthe object to be inspected by using input images obtained by capturingthe object to be inspected from different directions.

Patent Document 1: JP 2000-180382 A

SUMMARY

The visual inspection device disclosed in Patent Document 1 needs toinclude a plurality of cameras in order to capture an object to beinspected from various directions. This leads to high costs of thevisual inspection device and a complicated configuration of the visualinspection device. Therefore, a technology for inspecting an externalappearance of an object to be inspected from various directions with onecamera is desired.

According to an aspect, an inspection system for inspecting an object tobe inspected includes: an omnidirectional camera; a movement deviceconfigured to cause the object to be inspected to circle around theomnidirectional camera in a state where a posture of the object to beinspected is maintained; an acquisition unit configured to output acapturing instruction to the omnidirectional camera at a plurality oftimings while the movement device causes the object to be inspected tocircle around the omnidirectional camera, the acquisition unit beingconfigured to acquire, from the omnidirectional camera, a plurality ofinput images indicating the object to be inspected from differentdirections; and an inspector configured to inspect the object to beinspected by using the plurality of input images.

It may be preferable that the movement device causes the object to beinspected to circle around the omnidirectional camera in a state where aconstant distance is maintained from the omnidirectional camera to theobject to be inspected.

It may be preferable that the movement device does not stop the objectto be inspected while the object to be inspected is circling around theomnidirectional camera.

It may be preferable that the inspection system further includes: astorage configured to associate and store a reference image obtained bycapturing in advance an object of a type identical to the object to beinspected from a different direction with a direction of the objectshown in the reference image; and an identification unit configured toidentify a first direction of the object to be inspected shown in afirst input image of the plurality of input images and a seconddirection of the object to be inspected shown in a second input image ofthe plurality of input images. The inspector compares the referenceimage associated with the first direction with the first input image,compares the reference image associated with the second direction withthe second input image, and inspects the object to be inspected based ona result of the comparison.

It may be preferable that the identification unit identifies the firstdirection based on a position of the object to be inspected at acapturing timing of the first input image, and a position of theomnidirectional camera, and identifies the second direction based on aposition of the object to be inspected at a capturing timing of thesecond input image, and the position of the omnidirectional camera.

It may be preferable that different marks are put at different positionson a surface of the movement device. The plurality of marks areassociated in advance with directions of the object to be inspected. Theidentification unit identifies each of the directions associated witheach of the marks shown in the first input image as the first direction,and identifies each of the directions associated with each of the marksshown in the second input image as the second direction.

It may be preferable that the inspector: identifies the position of theobject to be inspected shown in the first input image based on apositional relationship between the position of the object to beinspected at the capturing timing of the first input image and theomnidirectional camera, the inspector comparing the object to beinspected shown at the position with the reference image associated withthe first direction; identifies the position of the object to beinspected shown in the second input image based on a positionalrelationship between the position of the object to be inspected at thecapturing timing of the second input image and the omnidirectionalcamera, the inspector comparing the object to be inspected shown at theposition with the reference image associated with the second direction;and inspects the object to be inspected based on a result of thecomparison.

According to another aspect, a controller for controlling a movementdevice for moving an object to be inspected and an omnidirectionalcamera for capturing the object to be inspected includes: an acquisitionunit configured to output, to the movement device, an instruction forcausing the object to be inspected to circle around the omnidirectionalcamera in a state where a posture of the object to be inspected ismaintained, to output a capturing instruction to the omnidirectionalcamera at a plurality of timings while the movement device causes theobject to be inspected to circle around the omnidirectional camera, andto acquire, from the omnidirectional camera, a plurality of input imagesindicating the object to be inspected from different directions; and aninspector configured to inspect the object to be inspected by using theplurality of input images.

According to another aspect, an inspection method for inspecting anobject to be inspected includes: causing the object to be inspected tocircle around an omnidirectional camera in a state where a posture ofthe object to be inspected is maintained; outputting a capturinginstruction to the omnidirectional camera at a plurality of timingswhile the object to be inspected is circling around the omnidirectionalcamera, and acquiring, from the omnidirectional camera, a plurality ofinput images indicating the object to be inspected from differentdirections; and inspecting the object to be inspected by using theplurality of input images.

According to another aspect, a non-transitory computer-readable storagemedium storing an inspection program for inspecting an object to beinspected, the inspection program causing a computer to execute: causingthe object to be inspected to circle around an omnidirectional camera ina state where a posture of the object to be inspected is maintained;outputting a capturing instruction to the omnidirectional camera at aplurality of timings while the object to be inspected is circling aroundthe omnidirectional camera, and acquiring, from the omnidirectionalcamera, a plurality of input images indicating the object to beinspected from different directions; and inspecting the object to beinspected by using the plurality of input images.

In one aspect, an external appearance of an object to be inspected canbe inspected from various directions with one camera.

The above and additional objects, features, aspects, and advantages ofthe present disclosure will become apparent in the following detaileddescription regarding one or more embodiments that will be understood inrelation to accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view illustrating a basic configuration of aninspection system according to a first embodiment;

FIGS. 2A and 2B are views each illustrating one example of a workpiece,which is an object to be inspected;

FIG. 3 is a view illustrating a process in which a robot according to afirst embodiment is causing a workpiece to circle around anomnidirectional camera;

FIG. 4 is a diagram illustrating one example of input images obtainedfrom an omnidirectional camera according to a first embodiment;

FIG. 5 is a diagram illustrating one example of a functionalconfiguration of a controller according to a first embodiment;

FIG. 6 is a diagram illustrating a first identification method foridentifying a direction of a workpiece;

FIG. 7 is a diagram for describing a second identification method foridentifying a direction of a workpiece;

FIG. 8 is a view illustrating a grip portion 210, which is a portionwith which a robot according to a first embodiment grips a workpiece;

FIG. 9 is a diagram illustrating a third identification method foridentifying a direction of a workpiece;

FIG. 10 is a conceptual diagram schematically illustrating an inspectionprocess of a workpiece by an inspector;

FIG. 11 is a flowchart illustrating an inspection process by acontroller according to a first embodiment;

FIG. 12 is a block diagram illustrating a hardware configuration exampleof a controller according to a first embodiment;

FIG. 13 is a view illustrating how a conveyor that serves as a movementdevice conveys workpieces W;

FIG. 14 is a diagram illustrating one example of input images obtainedfrom an omnidirectional camera according to a second embodiment;

FIG. 15 is a conceptual diagram schematically illustrating an inspectionprocess of a workpiece according to a second embodiment;

FIG. 16 is a flowchart illustrating an inspection process by acontroller according to a second embodiment;

FIG. 17 is a view illustrating a process in which a robot according to athird embodiment causes a workpiece to circle around an omnidirectionalcamera;

FIG. 18 is a diagram illustrating one example of input images obtainedfrom an omnidirectional camera according to a third embodiment; and

FIG. 19 is a view illustrating how a robot according to a fourthembodiment causes a workpiece to circle around an omnidirectional camerain a square.

DETAILED DESCRIPTION

Embodiments will be described below with reference to the drawings. Inthe following description, the same component and constituent elementare denoted with the same reference symbol. A name and function thereofare the same. Therefore, detailed descriptions thereof will not berepeated.

First Embodiment

[A. Inspection System 1]

With reference to FIG. 1, a basic configuration of an inspection system1 according to an embodiment will be described. FIG. 1 is a schematicview illustrating a basic configuration of an inspection system 1according to an embodiment.

As illustrated in FIG. 1, the inspection system 1 includes, for example,a controller 100, a robot 200 that serves as a movement device, and anomnidirectional camera 300.

The controller 100 is, for example, a programmable logic controller(PLC), and controls the entire inspection system 1. As one example, thecontroller 100 controls devices such as an image sensor 51, the robot200, and the omnidirectional camera 300.

The controller 100 is connected, for example, to a field network 54 in adaisy chain with the image sensor 51 and a counter 52. As the fieldnetwork 54, for example, EtherCAT (registered trademark) is employed.The controller 100 has a communication linkage with the robot 200 via afield network 56. As the field network 56, for example, EtherNET(registered trademark) is employed.

The inspection system 1 performs predetermined work on a workpiece W(object to be inspected) conveyed on a conveyor 20A. The workpiece W isa product or semi-finished product, and for example, may be anelectronic component or a food.

The image sensor 51 regularly captures the conveyor 20A and detects theworkpiece W from an obtained input image. As one example, the imagesensor 51 detects the workpiece W by image processing such as templatematching. A coordinate value of the workpiece W in the input image isoutput to the controller 100.

The counter 52 measures a movement amount of the conveyor 20A based on apulse wave generated from an encoder 53. More specifically, the encoder53 generates a pulse signal according to the movement amount of theconveyor 20A. The counter 52 receives the pulse signal from the encoder53 and counts the number of pulses included in the pulse signal tomeasure the movement amount of the conveyor 20A. The counter 52 thentransmits a counted value of the pulse wave to the controller 100 atconstant communication intervals.

The controller 100 substitutes the coordinate value (camera coordinatesystem) of the workpiece W in the input image received from the imagesensor 51 into a coordinate transformation equation determined inadvance. The controller 100 then transforms the coordinate value of theworkpiece W of the camera coordinate system into a coordinate value of aworld coordinate system. The world coordinate system is a coordinatesystem for controlling the robot 200. Every time the controller 100receives the counted value from the counter 52, the controller 100calculates the movement amount from last time on the conveyor 20A. Thecontroller 100 then adds the movement amount to the coordinate value ofthe workpiece W indicated in the world coordinate system. The movementamount of the conveyor 20A corresponding to one count is set in advance.The controller 100 can track the workpiece W conveyed on the conveyor20A by sequentially updating the coordinate value of the workpiece Windicated in the world coordinate system.

Based on the workpiece W having reached a range determined in advance onthe conveyor 20A, the controller 100 sends a workpiece W pickupinstruction to the robot 200. At this time, the controller 100sequentially sends, to the robot 200, the coordinate value of theworkpiece W on the conveyor 20A. This allows the robot 200 to grasp acurrent position of the workpiece W and to pick up the workpiece W onthe conveyor 20A.

Subsequently, the robot 200 causes the workpiece W to circle around theomnidirectional camera 300 in a state where a posture of the workpiece Wis maintained, and then the robot 200 moves the workpiece W to aconveyor 20B. “The state where the posture of the workpiece W ismaintained” means a state where the workpiece W is fixed so as toprevent the workpiece W from rotating. This is a state where eachsurface of the workpiece W is always in the same direction during acircling process. The controller 100 captures the workpiece W while theworkpiece W is circling around the omnidirectional camera 300. Thecontroller 100 then inspects an external appearance of the workpiece Wby using the input image obtained as a result of the capturing. Detailsof the inspection process will be described later.

Note that although FIG. 1 illustrates the example in which theinspection system 1 includes one controller 100, the inspection system 1may include a plurality of controllers 100. Also, although FIG. 1illustrates the example in which the inspection system 1 includes onerobot 200, the inspection system 1 may include a plurality of robots200. Also, although FIG. 1 illustrates the example in which theinspection system 1 includes one omnidirectional camera 300, theinspection system 1 may include a plurality of omnidirectional cameras300.

[B. Workpiece W Capturing Process]

With reference to FIGS. 2 to 4, a workpiece W capturing process by theomnidirectional camera 300 will be described.

FIGS. 2A and 2B are views each illustrating one example of the workpieceW, which is an object to be inspected. For convenience of describing adirection of the workpiece W, the following description assumes that theworkpiece W is a cube. As illustrated in FIG. 2, it is assumed that “anE surface” of the workpiece W is orthogonal to “an A surface” to “a Dsurface” of the workpiece W. It is assumed that “the A surface” of theworkpiece W faces “the C surface” of the workpiece W. It is assumed that“the B surface” of the workpiece W faces “the D surface” of theworkpiece W.

Note that a shape of the workpiece W, which is an object to beinspected, is not limited to a cube, but may be a polyhedron such as arectangular parallelepiped, cylindrical, and another shape.

FIG. 3 is a view illustrating a process in which the robot 200 iscausing the workpiece W to circle around the omnidirectional camera 300.

The omnidirectional camera 300 includes an omnidirectional mirror 331and a capturing unit 332. The omnidirectional mirror 331 reflects lightreceived from 360° around, and guides the reflected light to thecapturing unit 332. This allows the omnidirectional camera 300 tocapture an image 360° around.

As described above, the robot 200 causes the workpiece W to circlearound the omnidirectional camera 300 in the state where the posture ofthe workpiece W is maintained. At this time, since the posture of theworkpiece W is maintained, the external appearance of the workpiece Wwhen viewed from the omnidirectional camera 300 changes at each positionof the workpiece W.

Typically, a circling trajectory of the workpiece W is circular. Thatis, the robot 200 causes the workpiece W to circle around theomnidirectional camera 300 in a state where a constant distance ismaintained from the omnidirectional camera 300 to the workpiece W. Thisallows, while the workpiece W is circling around the omnidirectionalcamera 300, the constant distance to be always maintained between theworkpiece W and the omnidirectional camera 300. This results in aconstant size of the workpiece W shown in an image obtained from theomnidirectional camera 300.

Typically, the robot 200 does not stop the workpiece W while theworkpiece W is circling around the omnidirectional camera 300. Thisenables continuous inspection of the workpiece W that is sequentiallyconveyed, without stopping the workpiece W. Since a circling process ofthe workpiece W is performed during a pick and place operation of theworkpiece W, even if the circling process of the workpiece W is added, atact time does not increase.

While the robot 200 is causing the workpiece W to circle around, therobot 200 regularly transmits a position of the workpiece W (or aposition of an arm) to the controller 100. When the received position ofthe workpiece W is on the circling trajectory determined in advance, thecontroller 100 determines that the robot 200 is causing the workpiece Wto circle around the omnidirectional camera 300. The controller 100outputs a capturing instruction to the omnidirectional camera 300 at aplurality of timings while the workpiece W is circling around theomnidirectional camera 300. This allows the omnidirectional camera 300to capture the workpiece W from various directions. As a result, thecontroller 100 can acquire, from the omnidirectional camera 300, aplurality of input images indicating the workpiece W from differentdirections.

FIG. 4 is a diagram illustrating one example of the input imagesobtained from the omnidirectional camera 300. As one example, it isassumed that the controller 100 outputs the capturing instruction to theomnidirectional camera 300 at timing t1. As a result, an input image 33Aindicating “the D surface” of the workpiece W is obtained. Similarly, itis assumed that the controller 100 outputs the capturing instruction tothe omnidirectional camera 300 at timing t2. As a result, an input image33B indicating “the A surface” of the workpiece W is obtained.Similarly, it is assumed that the controller 100 outputs the capturinginstruction to the omnidirectional camera 300 at timing t3. As a result,an input image 33C indicating “the B surface” of the workpiece W isobtained. Similarly, it is assumed that the controller 100 outputs thecapturing instruction to the omnidirectional camera 300 at timing t4. Asa result, an input image 33D indicating “the C surface” of the workpieceW is obtained.

Intervals at which the capturing instruction is output are calculatedby, for example, dividing, by a capturing count, a circling time neededfor the workpiece W to circle around the omnidirectional camera 300 in afull circle. For example, when the circling time is one second and thecapturing count is four times, the capturing interval will be 0.25seconds (=¼). The circling time and the capturing count may be set inadvance, and may be set arbitrarily.

Thus, by outputting the capturing instruction to the omnidirectionalcamera 300 at different timings while the workpiece W is circlingaround, the controller 100 can acquire, from one omnidirectional camera300, the input images 30A to 30D indicating the workpiece W fromdifferent directions.

Note that FIG. 3 illustrates the example in which the workpiece Wcircles around the omnidirectional camera 300 in a full circle. However,the workpiece W does not necessarily have to circle around theomnidirectional camera 300 in a full circle. That is, the workpiece W isonly required to circle around the omnidirectional camera 300 in atleast part of a circle in the state where the posture is maintained.Also, the workpiece W does not need to circle around on a horizontalplane, and may circle around in any direction as long as the posture ismaintained in part or all of a visual field of the omnidirectionalcamera 300.

[C. Functional Configuration of Controller 100]

Functions of the controller 100 will be described with reference toFIGS. 5 to 10.

FIG. 5 is a diagram illustrating one example of a functionalconfiguration of the controller 100. As illustrated in FIG. 5, thecontroller 100 includes a processor 102 and a secondary storage device108 as major hardware components. The processor 102 includes anacquisition unit 150, an identification unit 152, and an inspector 154as functional components.

Note that although FIG. 5 illustrates the example in which theacquisition unit 150, the identification unit 152, and the inspector 154are mounted on the controller 100, at least part of these functions maybe mounted on another external device. For example, at least part ofthese functions may be mounted on an external device such as the imagesensor 51 (refer to FIG. 1) or a server. In this case, the controller100 and the external device cooperate to implement various processesaccording to an embodiment.

The following describes the acquisition unit 150, the identificationunit 152, and the inspector 154 sequentially.

(C1. Acquisition Unit 150)

The acquisition unit 150 outputs the capturing instruction to theomnidirectional camera 300 at a plurality of timings while the workpieceW is circling around the omnidirectional camera 300. The acquisitionunit 150 then acquires, from the omnidirectional camera 300, theplurality of input images indicating the workpiece W from differentdirections. Since a method for capturing the workpiece W has beendescribed in FIG. 3, the method will not be described again.

(C2. Identification Unit 152)

As described above, the robot 200 causes the workpiece W to circlearound the omnidirectional camera 300 in the state where the posture ofthe workpiece W is maintained. At this time, although the workpiece Witself does not rotate, a direction of the workpiece W changes whenviewed from the omnidirectional camera 300. Hereinafter, the directionof the workpiece W with respect to the omnidirectional camera 300 isalso referred to as “a workpiece direction.” That is, the workpiecedirection means an angle between a predetermined reference axis thatpasses on a circling plane and passes the center of the workpiece W, anda straight line connecting the workpiece W and the omnidirectionalcamera 300.

The identification unit 152 identifies the direction of the workpiece Wat a capturing timing of the workpiece W. Various methods are employedas the method for identifying the direction of the workpiece W. Themethod for identifying the direction of the workpiece W will bedescribed below with reference to FIGS. 6 to 9.

FIG. 6 is a diagram for describing a first identification method foridentifying the direction of the workpiece W. FIG. 6 illustrates aposition P1 of the omnidirectional camera 300, and a position P2 of theworkpiece W at a predetermined timing at which the workpiece W iscircling around the omnidirectional camera 300.

The position P1 of the omnidirectional camera 300 is prescribed, forexample, as a camera position 134 (refer to FIG. 5). The camera position134 may be set when the omnidirectional camera 300 is installed, and maybe arbitrarily set by a user. The camera position 134 may berepresented, for example, as a coordinate value on an xy plane, and maybe represented as a coordinate value on an xyz plane. The coordinatevalue represents, for example, the center of the omnidirectional camera300.

The position P2 of the workpiece W is acquired from the robot 200. Morespecifically, the controller 100 outputs, to the robot 200, a requestfor acquiring the position P2 of the workpiece W, simultaneously withoutputting the capturing instruction of the workpiece W to theomnidirectional camera 300. This allows the controller 100 to acquire,from the robot 200, the position P2 of the workpiece W at the time ofcapturing the workpiece W. The position P2 of the workpiece W may berepresented, for example, as a coordinate value on an xy plane, and maybe represented as a coordinate value on an xyz plane. The coordinatevalue represents, for example, the center of the workpiece W.

The identification unit 152 identifies a direction from the position P1of the omnidirectional camera 300 to the position P2 of the workpiece Was a capturing direction of the workpiece W. The capturing directioncorresponds to the direction of the workpiece W when viewed from theomnidirectional camera 300. In a case where the direction of theworkpiece W when the workpiece W reaches the circling trajectory isalways identical, the capturing direction corresponds to the directionof the workpiece W one-to-one. That is, the direction of the workpiece Wis always identical at an identical point on the circling trajectory.The identification unit 152 identifies the direction of the workpiece Wfrom the capturing direction of the workpiece W based on correspondencebetween the capturing direction of the workpiece W and the direction ofthe workpiece W.

The identification unit 152 identifies the direction of the workpiece Wfor all the input images obtained from the omnidirectional camera 300(for example, first and second input images). More specifically, theidentification unit 152 identifies the direction of the workpiece Wshown in the first input image based on the position of the workpiece Wat the capturing timing of the first input image and the position of theomnidirectional camera 300. Similarly, the identification unit 152identifies the direction of the workpiece W shown in the second inputimage based on the position of the workpiece W at the capturing timingof the second input image and the position of the omnidirectional camera300.

Next, with reference to FIG. 7, another method for identifying thedirection of the workpiece W will be described. FIG. 7 is a diagram fordescribing a second identification method for identifying the directionof the workpiece W.

FIG. 7 illustrates the input image 33B as one example of the inputimages obtained from the omnidirectional camera 300. When theomnidirectional camera 300 is used, a position in a long side directionof the input image 33B corresponds to a direction of a subject whenviewed from the omnidirectional camera 300. That is, a coordinate valueof the workpiece W in the input image 33B corresponds to the directionof the workpiece W one-to-one. Focusing on this point, based oncorrespondence between the coordinate value of the workpiece W in theinput image and the direction of the workpiece W, the identificationunit 152 identifies the direction of the workpiece W corresponding tothe coordinate value of the workpiece W detected from the input image33B. In the example of FIG. 7, the identification unit 152 identifies“135°” corresponding to a central position P3 of the workpiece W as thedirection of the workpiece W at the capturing timing of the input image33B.

Next, with reference to FIGS. 8 and 9, another method for identifyingthe direction of the workpiece W will be described. FIG. 8 is a viewillustrating a grip portion 210, which is a portion with which the robot200 grips the workpiece W.

FIG. 8 illustrates an enlarged view of the grip portion 210. Differentmarks are put at different positions on a surface of the grip portion210. The marks serve as reference for identifying the direction of theworkpiece W. Difference in the marks may be represented by difference incolor, and may be represented by difference in shape. In the example ofFIG. 8, a scale 211 is put on the grip portion 210, and the scale 211 isrepresented by marks 211A and 211B with different color.

Note that a position where the mark is put is not limited to the gripportion 210, but the mark is put at any position of the robot 200 if theposition is included in a visual field of the omnidirectional camera300.

FIG. 9 is a diagram for describing a third identification method foridentifying the direction of the workpiece W. The identification unit152 detects the grip portion 210 from an input image 38 obtained bycapturing the workpiece W. Next, the identification unit 152 identifiesa type of mark shown at the center or substantial center of the detectedgrip portion 210. Subsequently, with reference to mark information 128that prescribes the direction of the workpiece W for each type of mark,the identification unit 152 identifies a direction associated with theidentified mark as the direction of the workpiece W. In the example ofFIG. 9, “90°” associated with the mark 211B in the mark information 128is identified as the direction of the workpiece W.

The identification unit 152 identifies the direction of the workpiece Wfor all the input images obtained from the omnidirectional camera 300(for example, first and second input images). More specifically, theidentification unit 152 detects the mark shown in the first input imageand identifies the direction associated with the detected mark in themark information 128. The identification unit 152 then identifies theidentified direction as the direction of the workpiece W shown in thefirst input image. Similarly, the identification unit 152 detects themark shown in the second input image and identifies the directionassociated with the detected mark in the mark information 128. Theidentification unit 152 then identifies the identified direction as thedirection of the workpiece W shown in the second input image.

Note that the above description assumes that the direction of theworkpiece W when the workpiece W reaches the circling trajectory isalways identical. However, the direction of the workpiece W when theworkpiece W reaches the circling trajectory does not always need to beidentical. Even if the direction of the workpiece W at the time is notalways identical, if the direction of the workpiece W at one point onthe circling trajectory is detected, the identification unit 152 canidentify the direction of the workpiece W based on the direction of theworkpiece W at the one point. Identifying the direction of the workpieceW at the one point is implemented, for example, by image processing suchas template matching.

(C3. Inspector 154)

As described above, the acquisition unit 150 outputs the capturinginstruction to the omnidirectional camera 300 at a plurality of timingswhile the workpiece W is circling around the omnidirectional camera 300.The acquisition unit 150 then acquires, from the omnidirectional camera300, the plurality of input images indicating the workpiece W fromdifferent directions. The inspector 154 inspects the workpiece W, whichis an object to be inspected, using the plurality of input imagesacquired by the acquisition unit 150.

With reference to FIG. 10, an inspection process of the workpiece W bythe inspector 154 will be described. FIG. 10 is a conceptual diagramschematically illustrating the inspection process of the workpiece W bythe inspector 154.

FIG. 10 illustrates the input image 33B acquired by capturing “the Asurface” of the workpiece W as one example of the input image. Theinspection process by the inspector 154 will be described below byciting, as an example, the input image 33B, which is one of the inputimages acquired from the acquisition unit 150.

The inspector 154 inspects the workpiece W shown in the input image 33Bwith reference to reference image information 135. The reference imageinformation 135 includes a plurality of reference images obtained bycapturing in advance an object of a type identical to the object to beinspected. Each reference image is associated with a direction of theobject shown in the reference image. The reference image information 135is prepared in advance before the inspection process is executed. Forexample, the reference image information 135 is stored in advance in thesecondary storage device 108 of the controller 100 (refer to FIG. 12).

As described above, the identification unit 152 identifies the directionof the workpiece W shown in the input image 33B. The inspector 154identifies the reference image associated with the direction of theworkpiece W shown in the input image 33B with reference to the referenceimage information 135. In the example of FIG. 10, a reference image 135Aassociated with the direction of the workpiece W “135°” is identified.The inspector 154 compares the identified reference image 135A with theinput image 33B, and then inspects the workpiece W shown in the inputimage 33B based on a result of the comparison.

Typically, the inspector 154 calculates a similarity group between eachportion of the reference image 135A and the input image 33B whilescanning the identified reference image 135A on the input image 33B. Theinspector 154 then employs the maximum value of the similarity group asa similarity degree between the reference image 135A and the input image33B. The similarity degree is represented, for example, by a correlatedvalue between image information about the reference image 135A (forexample, pixel value), and image information about the input image 33B(for example, pixel value). When the calculated similarity degreeexceeds a value determined in advance, the inspector 154 determines thatthe external appearance of the workpiece W is normal. On the other hand,when the calculated similarity degree is equal to or less than the valuedetermined in advance, the inspector 154 determines that the externalappearance of the workpiece W is abnormal.

The inspector 154 performs such an inspection process on all the inputimages acquired from the acquisition unit 150 (for example, first andsecond input images). More specifically, the inspector 154 compares thereference image associated with the direction of the workpiece W shownin the first input image (first direction) with the first input image.Similarly, the inspector 154 compares the reference image associatedwith the direction of the workpiece W shown in the second input image(second direction) with the second input image. The inspector 154inspects the workpiece W based on results of the comparison.

Typically, when all the calculated similarity degrees about the inputimages exceed the value determined in advance, the inspector 154determines that the external appearance of the workpiece W is normal. Onthe other hand, when at least one of the calculated similarity degreesabout the input images is equal to or less than the value determined inadvance, the inspector 154 determines that the external appearance ofthe workpiece W is abnormal.

Typically, after cutting a portion in which the workpiece W is shown inthe input image 33B, the inspector 154 compares the cut portion with thereference image 135A. More specifically, when the omnidirectional camera300 is used, a position where the workpiece W is shown in the inputimage 33B depends on a positional relationship between the workpiece Wand the omnidirectional camera 300. Focusing on this point, theinspector 154 identifies the position of the object to be inspectedshown in the input image 33B based on the positional relationshipbetween the actual position of the workpiece W at the capturing timingof the input image 33B and the omnidirectional camera 300. Subsequently,the inspector 154 compares the workpiece W shown at the identifiedposition with the reference image associated with the direction of theworkpiece W, and then inspects the workpiece W based on a result of thecomparison. Identifying a workpiece portion shown in the input image andthen comparing the workpiece portion with the reference image makes theprocessing time required for the inspection process shorter thanscanning the reference image 135A in the input image 33B.

[D. Control Configuration of Controller 100]

The inspection process by the controller 100 will be described withreference to FIG. 11. FIG. 11 is a flowchart illustrating the inspectionprocess by the controller 100. The process illustrated in FIG. 11 isimplemented by the processor 102 of the controller 100 (refer to FIG. 5)executing a program. In other aspects, part or all of the process may beexecuted by a circuit element or other hardware.

In step S110, the processor 102 starts movement of the workpiece W bythe robot 200 based on receipt of an instruction to execute theinspection process. The workpiece W circles around the omnidirectionalcamera 300 in the movement process.

In step S112, the processor 102 determines whether the capturing timinghas come. As one example, the capturing timing comes at constant timeintervals after the workpiece W reaches the circling trajectory of theomnidirectional camera 300. When the processor 102 determines that thecapturing timing has come (YES in step S112), the processor 102 switchescontrol to step S114. Otherwise (NO in step S112), the processor 102executes the process of step S112 again.

In step S114, as the acquisition unit 150 (refer to FIG. 5), theprocessor 102 outputs the capturing instruction to the omnidirectionalcamera 300. The processor 102 then acquires the input image indicatingthe workpiece W from the omnidirectional camera 300.

In step S116, as the identification unit 152 (refer to FIG. 5), theprocessor 102 identifies the direction of the workpiece W shown in theinput image acquired in step S114. The method for identifying thedirection of the workpiece W has been described in FIG. 6 to FIG. 9, andthus descriptions thereof will not be repeated.

In step S118, as the inspector 154 (refer to FIG. 5), the processor 102acquires the reference image associated with the direction of theworkpiece W identified in step S116 with reference to the referenceimage information 135 (refer to FIG. 10). The processor 102 thencompares the reference image with the input image. The comparisonprocess between the reference image and the input image has beendescribed in FIG. 10, and thus descriptions thereof will not berepeated.

In step S120, the processor 102 determines whether the externalappearance of the workpiece W, which is an object to be inspected, isabnormal, based on a comparison result in step S118. As one example, theprocessor 102 determines that the external appearance of the workpiece Wis abnormal when the similarity degree between the reference image andthe input image is equal to or less than a value determined in advance.When the processor 102 determines that the external appearance of theworkpiece W is abnormal (YES in step S120), the processor 102 switchescontrol to step S130. Otherwise (NO in step S120), the processor 102switches control to step S122.

In step S122, the processor 102 determines whether a prescribedinspection count has been performed on one workpiece W. The prescribedinspection count may be set in advance, and may be set arbitrarily. Theprescribed inspection count corresponds to the capturing count on oneworkpiece W. When the processor 102 determines that the prescribedinspection count has been performed on one workpiece W (YES in stepS122), the processor 102 switches control to step S124. Otherwise (NO instep S122), the processor 102 returns control to step S112.

In step S124, the processor 102 reports that the external appearance ofthe workpiece W is normal. Any method of the report may be used. As oneexample, the external appearance of the workpiece W being normal may bedisplayed as a message, and may be output as a sound.

In step S130, the processor 102 reports that the external appearance ofthe workpiece W is abnormal. Any method of the report may be used. Asone example, the external appearance of the workpiece W being abnormalmay be displayed as a message, and may be output as a sound.

[E. Hardware Configuration of Controller 100]

With reference to FIG. 12, a hardware configuration of the controller100 according to an embodiment will be described. FIG. 12 is a blockdiagram illustrating a hardware configuration example of the controller100.

The controller 100 includes the processor 102 such as a centralprocessing unit (CPU) or a micro-processing unit (MPU), a chip set 104,a main storage device 106, and a secondary storage device 108. Thecontroller 100 also includes a local network controller 110, a universalserial bus (USB) controller 112, a memory card interface 114, aninternal bus controller 122, field bus controllers 118 and 120, and I/Ounits 124-1 and 124-2.

The processor 102 reads various programs stored in the secondary storagedevice 108 and develops and executes the programs in the main storagedevice 106. Thus, the processor 102 implements control such as controlaccording to an object to be controlled, and the inspection process. Thechip set 104 controls the processor 102 and each component, therebyimplementing process as the entire controller 100.

In addition to a system program for implementing a PLC engine, a userprogram 130 to be executed using the PLC engine is stored in thesecondary storage device 108. Furthermore, the camera position 134(refer to FIG. 5), the reference image information 135, and otherinformation are stored in the secondary storage device 108. The userprogram 130 includes a sequence program 131 that mainly performs logicalcalculations, and a motion program 132 that mainly performs numericalcalculations such as position control and speed control. In addition,the user program 130 includes an inspection program 133 that mainlyperforms calculations for implementing the inspection process of theworkpiece, and other programs.

The local network controller 110 controls data exchange with otherdevices (for example, server) via a local network. The USB controller112 controls data exchange with other devices (for example, personalcomputer (PC)) via USB connection.

The memory card interface 114 is configured such that a memory card 116is detachable. The memory card interface 114 can write data into thememory card 116 and read various types of data (such as user program andtrace data) from the memory card 116.

The internal bus controller 122 is an interface that exchanges data withthe I/O units 124-1,124-2, and other I/O units mounted on the controller100.

The field bus controller 118 controls data exchange with other devices(for example, image sensor 51, counter 52) via the field network 54.Similarly, the field bus controller 120 controls data exchange withother devices (for example, robot 200) via the field network 56.

FIG. 12 illustrates the configuration example in which necessaryfunctions are provided by the processor 102 executing the programs.However, part or all of these provided functions may be mounted usingdedicated hardware circuitry (for example, application specificintegrated circuit (ASIC) or a field-programmable gate array (FPGA)).Alternatively, main parts of the controller 100 may be implemented usinghardware according to general-purpose architecture (for example,industrial personal computer based on a general-purpose personalcomputer). In this case, a plurality of operating systems (OSs) fordifferent applications may be executed in parallel using virtualtechnique, and necessary applications may be executed on each OS.

[F. Summary of First Embodiment]

As described above, the controller 100 according to an embodimentinstructs the robot 200 to cause the workpiece W to circle around theomnidirectional camera 300 in the state where the posture of the objectto be inspected is maintained. The controller 100 outputs the capturinginstruction to the omnidirectional camera 300 at a plurality of timingswhile the robot 200 is causing the workpiece W to circle around theomnidirectional camera 300. At this time, since the posture of theworkpiece W is maintained, the external appearance of the workpiece Wwhen viewed from the omnidirectional camera 300 changes at each positionof the workpiece W. Therefore, the plurality of input images indicatingthe workpiece W from different directions is obtained. The controller100 inspects the workpiece W by using the plurality of input images.

Thus, by outputting the capturing instruction to the omnidirectionalcamera 300 at different timings while the workpiece W is circlingaround, the controller 100 can acquire, from one omnidirectional camera300, the input images 30A to 30D indicating the workpiece W fromdifferent directions.

Second Embodiment

[A. Outline]

In a first embodiment, the robot 200 has caused the workpiece W tocircle around the omnidirectional camera 300. In contrast, in a secondembodiment, a conveyor 200A causes a workpiece W to circle around anomnidirectional camera 300. This allows the omnidirectional camera 300to capture a plurality of workpieces W simultaneously.

Other points have been described in “first embodiment”, and thusdescriptions thereof will not be repeated below.

[B. Capturing Process of Workpiece W]

With reference to FIGS. 13 and 14, a capturing process of workpieces Win a second embodiment will be described.

FIG. 13 is a view illustrating how a conveyor 200A that serves as amovement device conveys workpieces W. FIG. 13 illustrates workpieces W1to W6 as one example of objects to be inspected. In an embodiment, theconveyor 200A causes the plurality of workpieces W1 to W6 to besimultaneously conveyed around the omnidirectional camera 300. At thistime, the conveyor 200A causes the workpieces W1 to W6 to circle aroundthe omnidirectional camera 300 in a state where postures of theworkpieces W1 to W6 are maintained. Since the postures of the workpiecesW1 to W6 are maintained, the external appearance of each workpiece whenviewed from the omnidirectional camera 300 changes at each workpieceposition.

The controller 100 outputs a capturing instruction to theomnidirectional camera 300 at a plurality of timings while theworkpieces W1 to W6 are circling around. This allows the omnidirectionalcamera 300 to capture the workpieces from various directions. As aresult, the controller 100 can acquire a plurality of input imagesindicating the workpieces from different directions.

FIG. 14 is a diagram illustrating one example of input images obtainedfrom the omnidirectional camera 300 according to a second embodiment. Asone example, it is assumed that the controller 100 outputs the capturinginstruction to the omnidirectional camera 300 at timing t11. As aresult, an input image 37A is obtained indicating “a C surface” of theworkpiece W2, “a D surface” of the workpiece W3, “an A surface” of theworkpiece W4, and “a B surface” of the workpiece W5. It is assumed thatthe controller 100 outputs the capturing instruction to theomnidirectional camera 300 at timing t12. As a result, an input image37B is obtained indicating “the C surface” of the workpiece W3, “the Dsurface” of the workpiece W4, “the A surface” of the workpiece W5, and“the B surface” of the workpiece W6. It is assumed that the controller100 outputs the capturing instruction to the omnidirectional camera 300at timing t13. As a result, an input image 37C is obtained indicating“the C surface” of the workpiece W4, “the D surface” of the workpieceW5, “the A surface” of the workpiece W6, and “the B surface” of theworkpiece W7. It is assumed that the controller 100 outputs thecapturing instruction to the omnidirectional camera 300 at timing t14.As a result, an input image 37D is obtained indicating “the C surface”of the workpiece W5, “the D surface” of the workpiece W6, “the Asurface” of the workpiece W7, and “the B surface” of the workpiece W8.

Intervals at which the capturing instruction is output are calculated,for example, by dividing, by a capturing count, a circling time neededfor the conveyor 200A to cause each workpiece to circle around (in afull circle). For example, when the circling time is one second and thecapturing count is four times, the capturing interval will be 0.25seconds (=¼). The circling time and the capturing count may be set inadvance, and may be set arbitrarily.

Thus, by outputting the capturing instruction to the omnidirectionalcamera 300 at different timings while the workpieces W1 to W6 arecircling around, the controller 100 can acquire, from oneomnidirectional camera 300, the plurality of input images indicatingeach workpiece from different directions.

Typically, the conveyor 200A conveys the workpieces such that eachworkpiece direction when the workpiece reaches the circling trajectoryis always identical. As a result, as illustrated in FIG. 14, the samesurface of each workpiece is shown at the same position in the inputimages 37A to 37D.

Note that although FIG. 13 illustrates the example in which theworkpieces W1 to W6 circle around the omnidirectional camera 300 in afull circle, the workpieces W1 to W6 do not necessarily have to circlearound the omnidirectional camera 300 in a full circle. That is, theworkpieces W1 to W6 are at least required to circle around theomnidirectional camera 300 in part of a circle in the state where thepostures are maintained.

[C. Inspection Process of Workpiece W]

With reference to FIG. 15, the inspection process of the workpiece bythe inspector 154 (refer to FIG. 5) according to a second embodimentwill be described. FIG. 15 is a conceptual diagram schematicallyillustrating the inspection process of the workpiece according to asecond embodiment.

FIG. 15 illustrates, as one example of the input images, the input image37A obtained by simultaneously capturing “the C surface” of theworkpiece W2, “the D surface” of the workpiece W3, “the A surface” ofthe workpiece W4, and “the B surface” of the workpiece W5. Theinspection process by the inspector 154 will be described below byciting, as an example, the input image 37A, which is one of the obtainedinput images.

The identification unit 152 (refer to FIG. 5) identifies directions ofthe workpieces W2 to W5 shown in the input image 37A. As a method foridentifying each workpiece direction, “the first to third identificationmethods” described in “first embodiment” are employed. Each workpiecedirection identified by the identification unit 152 is output to theinspector 154. In the example of FIG. 15, “45°”, “135°”, “225°”, and“315°” are output to the inspector 154 as each workpiece direction.

The inspector 154 inspects the workpieces W2 to W5 shown in the inputimage 37A with reference to the reference image information 135. Thereference image information 135 includes a plurality of reference imagesobtained by capturing in advance an object of a type identical to anobject to be inspected. Each reference image is associated with anobject direction shown in the reference image. The reference imageinformation 135 is prepared in advance before the inspection process isexecuted. For example, the reference image information 135 is stored inadvance in a device such as the secondary storage device 108 of thecontroller 100 (refer to FIG. 12).

The inspector 154 identifies the reference images corresponding to thedirections of the workpieces W shown in the input image 37A withreference to the reference image information 135. In the example of FIG.15, a reference image 136A corresponding to a workpiece direction “45°”and a reference image 136B corresponding to a workpiece direction “135°”are identified. Also, a reference image 136C corresponding to aworkpiece direction “225°” and a reference image 136D corresponding to aworkpiece direction “315°” are identified. The inspector 154 compareseach of the identified reference images 136A to 136D with the inputimage 37A, and then inspects the workpieces W2 to W5 shown in the inputimage 37A based on a result of the comparison. The comparison processbetween the reference image and the input image has been described inFIG. 10, and thus descriptions thereof will not be repeated.

The inspector 154 executes the comparison process between the referenceimages and all of the plurality of input images acquired by theacquisition unit 150. Typically, the inspector 154 extracts the sameworkpiece from each input image, and then calculates a similarity degreebetween each extracted workpiece portion and the corresponding referenceimage. For example, when performing inspection on the workpiece W5, theinspector 154 performs the following calculations. The inspector 154calculates the similarity degree between the workpiece W5 in the inputimage 37A and the reference image 136A. Also, the inspector 154calculates the similarity degree between the workpiece W5 in the inputimage 37B (refer to FIG. 14) and the reference image 136B. Also, theinspector 154 calculates the similarity degree between the workpiece W5in the input image 37C (refer to FIG. 14) and the reference image 136C.Also, the inspector 154 calculates the similarity degree between theworkpiece W5 in the input image 37D (refer to FIG. 14) and the referenceimage 136D. Then, when all the similarity degrees calculated about theworkpiece W5 exceed a value determined in advance, the inspector 154determines that the external appearance of the workpiece W5 is normal.On the other hand, when at least one of the similarity degreescalculated about the workpiece W5 is equal to or less than the valuedetermined in advance, the inspector 154 determines that the externalappearance of the workpiece W5 is abnormal.

[D. Control Configuration of Controller 100]

With reference to FIG. 16, the inspection process by the controller 100according to a second embodiment will be described. FIG. 16 is aflowchart illustrating the inspection process by the controller 100according to a second embodiment. The process illustrated in FIG. 16 isimplemented by the processor 102 of the controller 100 (refer to FIG. 5)executing a program. In other aspects, part or all of the process may beexecuted by a circuit element or other hardware.

In step S210, the processor 102 starts conveyance of the workpiece bythe conveyor 200A based on receipt of an instruction to execute theinspection process. The workpiece circles around the omnidirectionalcamera 300 in the conveyance process.

In step S220, the processor 102 determines whether the capturing timinghas come. The capturing timing comes, for example, at constant timeintervals. When the processor 102 determines that the capturing timinghas come (YES in step S220), the processor 102 switches control to stepS222. Otherwise (NO in step S220), the processor 102 executes theprocess of step S220 again.

In step S222, as the acquisition unit 150 (refer to FIG. 5), theprocessor 102 outputs the capturing instruction to the omnidirectionalcamera 300. The processor 102 then acquires the input image indicatingthe workpiece from the omnidirectional camera 300.

In step S224, the processor 102 detects the workpiece from the inputimage acquired in step S222. As illustrated in FIG. 1, the processor 102grasps each workpiece position on the conveyor 200A by a trackingprocess. The position of each workpiece on the conveyor 200A correspondsto the position of each workpiece in the input image. Therefore, theprocessor 102 can identify the position of each workpiece in the inputimage from the position of each workpiece on the conveyor 200Aidentified by the tracking process. Note that the processor 102 mayidentify the workpiece position in the input image by using an imageprocessing technology such as template matching.

In step S226, as the identification unit 152 (refer to FIG. 5), theprocessor 102 determines any one uninspected workpiece from theworkpiece detected in step S224 as the workpiece to be inspected. Theprocessor 102 then identifies the direction of the workpiece to beinspected. As a method for identifying the workpiece direction, “thefirst to third identification methods” described in “first embodiment”are employed.

In step S228, as the inspector 154 (refer to FIG. 5), the processor 102acquires a reference image corresponding to the workpiece directionidentified in step S226 with reference to the reference imageinformation 135 (refer to FIG. 15). The processor 102 then compares thereference image with the input image. The comparison process between thereference image and the input image has been described in FIG. 15, andthus descriptions thereof will not be repeated.

In step S230, the processor 102 determines whether the externalappearance of the workpiece, which is an object to be inspected, isabnormal, based on a result of the comparison in step S228. As oneexample, the processor 102 determines that the external appearance ofthe workpiece to be inspected is abnormal when the similarity degreebetween the reference image and the input image is equal to or less thana value determined in advance. When the processor 102 determines thatthe external appearance of the workpiece to be inspected is abnormal(YES in step S230), the processor 102 switches control to step S234.Otherwise (NO in step S230), the processor 102 switches control to stepS232.

In step S232, the processor 102 reports that the external appearance ofthe workpiece to be inspected is normal. Any method of the report may beused. As one example, the external appearance of the workpiece beingnormal may be displayed as a message, and may be output as a sound.

In step S234, the processor 102 reports that the external appearance ofthe workpiece to be inspected is abnormal. Any method of the report maybe used. As one example, the external appearance of the workpiece beingabnormal may be displayed as a message, and may be output as a sound.

In step S240, the processor 102 determines whether inspection of all theworkpieces detected in step S224 has ended. When the processor 102determines that inspection of all the workpieces detected in step S224has ended (YES in step S240), the processor 102 switches control to stepS250. Otherwise (NO in step S240), the processor 102 returns control tostep S226.

In step S250, the processor 102 determines whether to end the inspectionprocess. As one example, when the processor 102 receives an operation toend the inspection process, the processor 102 determines to end theinspection process. When the processor 102 determines to end theinspection process (YES in step S250), the processor 102 ends theinspection process illustrated in FIG. 16. Otherwise (NO in step S250),the processor 102 returns control to step S220.

[E. Summary of Second Embodiment]

As described above, in a second embodiment, the conveyor 200A causes theworkpieces, which are objects to be inspected, to circle around theomnidirectional camera 300. This allows the omnidirectional camera 300to capture the plurality of workpieces simultaneously, and to inspectthe plurality of workpieces simultaneously.

Also, the conveyor 200A causes each workpiece to circle around theomnidirectional camera 300 in a state where the posture of the workpieceis maintained. The controller 100 outputs the capturing instruction tothe omnidirectional camera 300 at a plurality of timings while theworkpiece is circling around. This allows the omnidirectional camera 300to capture each workpiece from various directions. As a result, for eachworkpiece, the controller 100 can acquire the plurality of input imagesindicating the workpiece from different directions.

Third Embodiment

[Outline]

In a first embodiment, a shape of a workpiece W, which is an object tobe inspected, has been a cube. In contrast, in a third embodiment, ashape of a workpiece W, which is an object to be inspected, iscylindrical. When the workpiece is cylindrical, even if a side surfaceof the workpiece is captured from different directions, the shape of theworkpiece shown in an image does not change. Therefore, the controller100 according to a third embodiment does not identify a workpiecedirection when the shape of the object to be inspected is cylindrical.This shortens processing time.

Other points have been described in “first embodiment”, and thusdescriptions thereof will not be repeated below.

[B. Capturing Process of Workpiece W]

With reference to FIGS. 17 and 18, a capturing process of the workpieceW in a third embodiment will be described.

FIG. 17 is a view illustrating a process in which a robot 200 accordingto a third embodiment causes the workpiece W to circle around anomnidirectional camera 300. As illustrated in FIG. 17, in an embodiment,the shape of the workpiece W is cylindrical. The controller 100 outputsa capturing instruction to the omnidirectional camera 300 at a pluralityof timings while the workpiece W is circling around the omnidirectionalcamera 300. This allows the omnidirectional camera 300 to capture theworkpiece W from various directions. As a result, the controller 100 canacquire, from the omnidirectional camera 300, a plurality of inputimages indicating the workpiece W from different directions.

FIG. 18 is a diagram illustrating one example of input images obtainedfrom the omnidirectional camera 300 according to a third embodiment. Asone example, it is assumed that the controller 100 outputs the capturinginstruction to the omnidirectional camera 300 at timing t21. As aresult, an input image 39A is obtained. Similarly, it is assumed thatthe controller 100 outputs the capturing instruction to theomnidirectional camera 300 at timing t22. As a result, an input image39B is obtained. Similarly, it is assumed that the controller 100outputs the capturing instruction to the omnidirectional camera 300 attiming t23. As a result, an input image 39C is obtained. Similarly, itis assumed that the controller 100 outputs the capturing instruction tothe omnidirectional camera 300 at timing t24. As a result, an inputimage 39D is obtained.

As illustrated in the input images 39A to 39D, when the workpiece W iscylindrical, even if a side surface of the workpiece W is captured fromdifferent directions, the shape of the workpiece W shown in the inputimages does not change. Therefore, the controller 100 according to anembodiment does not need to identify the workpiece direction shown inthe input images. Also, in an embodiment, it is not necessary to preparethe reference image for each direction of the workpiece W, and it issufficient if at least one reference image is prepared.

The controller 100 compares each of the input images obtained bycapturing the workpiece W from various directions with the referenceimage prepared in advance, and then inspects the workpiece W based on aresult of the comparison. This allows the controller 100 to inspect thecylindrical workpiece W from every direction.

[Summary of Third Embodiment]

As described above, when the workpiece is cylindrical, even if the sidesurface of the workpiece is captured from different directions, theshape of the workpiece shown in the input images does not change.Therefore, the controller 100 according to an embodiment does notidentify the workpiece direction, when the shape of the object to beinspected is cylindrical. This shortens processing time.

Fourth Embodiment

In a first embodiment, the robot 200 has caused the workpiece W tocircle around the omnidirectional camera 300 in a circle. In contrast,in a fourth embodiment, a robot 200 causes a workpiece W to circlearound an omnidirectional camera 300 in a square.

FIG. 19 is a view illustrating how the robot 200 causes the workpiece Wto circle around the omnidirectional camera 300 in a square. Thus, acircling trajectory of the workpiece W is not limited to circular. In astate where a posture of the workpiece W is maintained, the circlingtrajectory of the workpiece W is arbitrary. For example, the circlingtrajectory of the workpiece W may be elliptical, rectangular, or anyother shapes.

The embodiments disclosed this time are to be considered in all respectsas illustrative and not restrictive. The scope of the invention isindicated by the appended claims rather than by the foregoingdescription, and all changes which come within the meaning and range ofequivalency of the claims are therefore intended to be embraced therein.

1. An inspection system for inspecting an object to be inspected, theinspection system comprising: an omnidirectional camera; a movementdevice configured to cause the object to be inspected to circle aroundthe omnidirectional camera in a state where a posture of the object tobe inspected is maintained; an acquisition unit configured to output acapturing instruction to the omnidirectional camera at a plurality oftimings while the movement device causes the object to be inspected tocircle around the omnidirectional camera, the acquisition unit beingconfigured to acquire, from the omnidirectional camera, a plurality ofinput images indicating the object to be inspected from differentdirections; and an inspector configured to inspect the object to beinspected by using the plurality of input images.
 2. The inspectionsystem according to claim 1, wherein the movement device causes theobject to be inspected to circle around the omnidirectional camera in astate where a constant distance is maintained from the omnidirectionalcamera to the object to be inspected.
 3. The inspection system accordingto claim 1, wherein the movement device does not stop the object to beinspected while the object to be inspected is circling around theomnidirectional camera.
 4. The inspection system according to claim 1,further comprising: a storage configured to associate and store areference image obtained by capturing in advance an object of a typeidentical to the object to be inspected from a different direction witha direction of the object shown in the reference image; and anidentification unit configured to identify a first direction of theobject to be inspected shown in a first input image of the plurality ofinput images and a second direction of the object to be inspected shownin a second input image of the plurality of input images, wherein theinspector: compares the reference image associated with the firstdirection, with the first input image; compares the reference imageassociated with the second direction, with the second input image; andinspects the object to be inspected based on a result of the comparison.5. The inspection system according to claim 4, wherein theidentification unit: identifies the first direction based on a positionof the object to be inspected at a capturing timing of the first inputimage, and a position of the omnidirectional camera; and identifies thesecond direction based on a position of the object to be inspected at acapturing timing of the second input image, and the position of theomnidirectional camera.
 6. The inspection system according to claim 4,wherein different marks are put at different positions on a surface ofthe movement device, the plurality of marks are associated in advancewith directions of the object to be inspected, and the identificationunit: identifies each of the directions associated with each of themarks shown in the first input image as the first direction; andidentifies each of the directions associated with each of the marksshown in the second input image as the second direction.
 7. Theinspection system according claim 4, wherein the inspector: identifiesthe position of the object to be inspected shown in the first inputimage based on a positional relationship between the position of theobject to be inspected at the capturing timing of the first input imageand the omnidirectional camera, the inspector comparing the object to beinspected shown at the position with the reference image associated withthe first direction; identifies the position of the object to beinspected shown in the second input image based on a positionalrelationship between the position of the object to be inspected at thecapturing timing of the second input image and the omnidirectionalcamera, the inspector comparing the object to be inspected shown at theposition with the reference image associated with the second direction;and inspects the object to be inspected based on a result of thecomparison.
 8. A controller for controlling a movement device for movingan object to be inspected and an omnidirectional camera for capturingthe object to be inspected, the controller comprising: an acquisitionunit configured to output, to the movement device, an instruction forcausing the object to be inspected to circle around the omnidirectionalcamera in a state where a posture of the object to be inspected ismaintained, to output a capturing instruction to the omnidirectionalcamera at a plurality of timings while the movement device causes theobject to be inspected to circle around the omnidirectional camera, andto acquire, from the omnidirectional camera, a plurality of input imagesindicating the object to be inspected from different directions; and aninspector configured to inspect the object to be inspected by using theplurality of input images.
 9. An inspection method for inspecting anobject to be inspected, the inspection method comprising: causing theobject to be inspected to circle around an omnidirectional camera in astate where a posture of the object to be inspected is maintained;outputting a capturing instruction to the omnidirectional camera at aplurality of timings while the object to be inspected is circling aroundthe omnidirectional camera, and acquiring, from the omnidirectionalcamera, a plurality of input images indicating the object to beinspected from different directions; and inspecting the object to beinspected by using the plurality of input images.
 10. A non-transitorycomputer-readable storage medium storing an inspection program forinspecting an object to be inspected, the inspection program causing acomputer to perform operations comprising: causing the object to beinspected to circle around an omnidirectional camera in a state where aposture of the object to be inspected is maintained; outputting acapturing instruction to the omnidirectional camera at a plurality oftimings while the object to be inspected is circling around theomnidirectional camera, and acquiring, from the omnidirectional camera,a plurality of input images indicating the object to be inspected fromdifferent directions; and inspecting the object to be inspected by usingthe plurality of input images.
 11. The inspection system according toclaim 2, wherein the movement device does not stop the object to beinspected while the object to be inspected is circling around theomnidirectional camera.
 12. The inspection system according to claim 2,further comprising: a storage configured to associate and store areference image obtained by capturing in advance an object of a typeidentical to the object to be inspected from a different direction witha direction of the object shown in the reference image; and anidentification unit configured to identify a first direction of theobject to be inspected shown in a first input image of the plurality ofinput images and a second direction of the object to be inspected shownin a second input image of the plurality of input images, wherein theinspector: compares the reference image associated with the firstdirection, with the first input image; compares the reference imageassociated with the second direction, with the second input image; andinspects the object to be inspected based on a result of the comparison.13. The inspection system according to claim 3, further comprising: astorage configured to associate and store a reference image obtained bycapturing in advance an object of a type identical to the object to beinspected from a different direction with a direction of the objectshown in the reference image; and an identification unit configured toidentify a first direction of the object to be inspected shown in afirst input image of the plurality of input images and a seconddirection of the object to be inspected shown in a second input image ofthe plurality of input images, wherein the inspector: compares thereference image associated with the first direction, with the firstinput image; compares the reference image associated with the seconddirection, with the second input image; and inspects the object to beinspected based on a result of the comparison.
 14. The inspection systemaccording to claim 11, further comprising: a storage configured toassociate and store a reference image obtained by capturing in advancean object of a type identical to the object to be inspected from adifferent direction with a direction of the object shown in thereference image; and an identification unit configured to identify afirst direction of the object to be inspected shown in a first inputimage of the plurality of input images and a second direction of theobject to be inspected shown in a second input image of the plurality ofinput images, wherein the inspector: compares the reference imageassociated with the first direction, with the first input image;compares the reference image associated with the second direction, withthe second input image; and inspects the object to be inspected based ona result of the comparison.